package com.climber.android.lib_share.platform.wechat

import cn.sharesdk.framework.ShareSDK
import cn.sharesdk.wechat.friends.Wechat
import com.climber.android.lib_share.platform.PlatformAuthorizeDelegate
import com.climber.android.lib_share.sensor.AuthorizeAction
import com.climber.android.lib_share.sensor.AuthorizeResultCallBack

/**
 * Created by Mikes at 2020-03-19 23:37
 */
class WeChatLogin : AuthorizeAction {
    override fun doAuthorize(builder: AuthorizeResultCallBack.Builder.() -> Unit) {
        val platformDelegate = PlatformAuthorizeDelegate(ShareSDK.getPlatform(Wechat.NAME), builder)
        platformDelegate.doAuthorize()
    }

    override fun doUserInfo(builder: AuthorizeResultCallBack.Builder.() -> Unit) {
        val platformDelegate = PlatformAuthorizeDelegate(ShareSDK.getPlatform(Wechat.NAME), builder)
        platformDelegate.doUserInfo()
    }
}